/* 主样式 - 全局基础样式 */

body { 
    margin: 0; 
    overflow: hidden;
    font-family: Arial, sans-serif;
}

/* ===================================================
   全局消息提示系统
   =================================================== */

/* 消息容器 - 固定在顶部 */
.global-message-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

/* 消息项 */
.global-message {
    min-width: 300px;
    max-width: 600px;
    padding: 14px 20px;
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease-out;
    pointer-events: auto;
}

.global-message.show {
    opacity: 1;
    transform: translateY(0);
}

.global-message.hiding {
    opacity: 0;
    transform: translateY(-20px);
}

/* 消息图标 */
.global-message-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
}

/* 消息文本 */
.global-message-text {
    flex: 1;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
    white-space: pre-line;
}

/* 成功消息 */
.global-message.success {
    border-left: 4px solid #4caf50;
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.25) 0%, rgba(30, 30, 30, 0.95) 30%);
}

/* 警告消息 */
.global-message.warning {
    border-left: 4px solid #ff9800;
    background: linear-gradient(90deg, rgba(255, 152, 0, 0.25) 0%, rgba(30, 30, 30, 0.95) 30%);
}

/* 错误消息 */
.global-message.error {
    border-left: 4px solid #f44336;
    background: linear-gradient(90deg, rgba(244, 67, 54, 0.25) 0%, rgba(30, 30, 30, 0.95) 30%);
}

/* 信息消息 */
.global-message.info {
    border-left: 4px solid #2196f3;
    background: linear-gradient(90deg, rgba(33, 150, 243, 0.25) 0%, rgba(30, 30, 30, 0.95) 30%);
}

/* ===================================================
   全局确认/输入对话框系统
   =================================================== */

/* 遮罩层 */
.global-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.global-confirm-overlay.show {
    opacity: 1;
}

/* 对话框 */
.global-confirm-dialog {
    background: white;
    border-radius: 12px;
    min-width: 360px;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.2s ease-out;
    overflow: hidden;
}

.global-confirm-overlay.show .global-confirm-dialog {
    transform: scale(1);
}

/* 对话框头部 */
.global-confirm-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.global-confirm-icon {
    font-size: 28px;
    line-height: 1;
}

.global-confirm-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* 对话框内容 */
.global-confirm-body {
    padding: 24px;
}

.global-confirm-message {
    margin: 0 0 16px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    white-space: pre-line;
}

/* 输入框 */
.global-prompt-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.global-prompt-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 对话框底部按钮区 */
.global-confirm-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    background: #f9f9f9;
}

/* 对话框按钮 */
.global-confirm-btn {
    padding: 9px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.global-confirm-btn-cancel {
    background: white;
    color: #666;
    border: 1px solid #d0d0d0;
}

.global-confirm-btn-cancel:hover {
    background: #f5f5f5;
    border-color: #b0b0b0;
}

.global-confirm-btn-confirm {
    background: #667eea;
    color: white;
}

.global-confirm-btn-confirm:hover {
    background: #5568d3;
}

.global-confirm-btn-confirm:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* 不同类型的确认按钮 */
.global-confirm-btn-confirm.danger {
    background: #f44336;
}

.global-confirm-btn-confirm.danger:hover {
    background: #d32f2f;
}

.global-confirm-btn-confirm.warning {
    background: #ff9800;
}

.global-confirm-btn-confirm.warning:hover {
    background: #f57c00;
}

